package engine.newUi
{
	import engine.ui.lite.BaseUI;
	
	import flash.display.DisplayObject;
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.geom.Point;
	
	import newx.StageInfo;
	import newx.com.control.button.NxButton;
	import newx.com.control.group.NxViewGroup;
	import newx.com.control.text.NxLabel;

	/**
	/* @DiceUI
	/* @generate by uieditor
	*/
	 public class DiceUI extends BaseUI
	{
		/**
		 *第一个npc 
		 */		
		public var npcMc1	:MovieClip
		/**
		 *功法的布局 
		 */		
		public var constipatGroup	:NxViewGroup
		public var npcMc2	:MovieClip
		public var npcMc3	:MovieClip
		public var npcMc4	:MovieClip 
		public var npcMc5	:MovieClip
		public var seletedMc:MovieClip;
		/**
		 *元宝 
		 */		
		public var goldLab	:NxLabel
		/**
		 * 金钱
		 */		
		public var moneyLab	:NxLabel
		/**
		 *一键扔色子 
		 */		
		public var diceBtn	:NxButton;
		/**
		 *一键卖出 
		 */		
		public var sellBtn	:NxButton
		/**
		 *一键拭去 
		 */		
		public var practiceBtn	:NxButton
		/**
		 *功法背包
		 */		
		public var packBtn	:NxButton 
		/**
		 *退出按鈕 
		 */		
		public var exitBtn	:NxButton 
		/**
		 *普通色子 
		 */		
		public var normalLab:NxLabel;
		public var bk2:MovieClip;
		/**
		 *水銀 色子
		 */		
		public var azothLab:NxLabel;
		public var azothSeleted:MovieClip;
		
		public var exchangeBtn:NxButton;
		public var bankBtn:NxButton;
		
		public var bk1:Sprite,bk3:MovieClip,bk4:Sprite,bk5:Sprite,bk6:Sprite,pp:Sprite,Btn:MovieClip;
		
		public var arrowMain:Sprite;

		private var control:DiceLogic=DiceLogic.getInstance();
		private var rightRangeArr:Array;
		private var rightRangPoint:Array=[];
		
		public var seletedLab:NxLabel;
		public function DiceUI(popupUI:Boolean=true)
		{
			super();
		}
		override public function Init():void
		{
//			rightRangeArr=[bk4];
			control.Init();
		}
		override protected function BeforeShow():void
		{
//			if(rightRangPoint.length<rightRangeArr.length)
//			{
//				for (var i:int = 0; i < rightRangeArr.length; i++) 
//				{
//					var di:DisplayObject=rightRangeArr[i];
//					rightRangPoint[i]=di.parent.localToGlobal(new Point(di.x,di.y));
//					rightRangPoint[i].x=StageInfo.stage.stageWidth-rightRangPoint[i].x;
//				}
//			}
			control.BeforeShow()
		}
		override protected function AfterHide():void
		{
			control.AfterHide();
		}
		override public function modifyPostion():void
		{
			super.modifyPostion();
//			for (var i:int = 0; i < rightRangeArr.length; i++) 
//			{
//				var di:DisplayObject=rightRangeArr[i];
//				var p:Point=rightRangPoint[i];
//				var pp:Point=p.clone();
//				pp.x=StageInfo.stage.stageWidth-p.x;
//				pp=di.parent.globalToLocal(pp);
//				di.x=pp.x;
//				
//			}
			
		}

	}
}
/**IniUIConfig::

[DiceUI]
initPosX=230
initPosY=168
controls=windowBG,npcMc1,constipatGroup,npcMc2,npcMc3,npcMc4,npcMc5,goldLab,moneyLab,diceBtn,sellBtn,practiceBtn,packBtn,exitBtn

[DiceUI_windowBG]
create=NxWindow,请填写标题名,600,420,Panel_1,DragType_Title
x=230
y=168
parent=this

[DiceUI_npcMc1]
create=CustomControl,custSkin_90
x=20
y=87
parent=windowBG

[DiceUI_constipatGroup]
create=NxViewGroup,2,10,Castle_Item_13
x=34
y=192
parent=windowBG

[DiceUI_npcMc2]
create=CustomControl,custSkin_91
x=125
y=89
parent=windowBG

[DiceUI_npcMc3]
create=CustomControl,custSkin_92
x=236
y=88
parent=windowBG

[DiceUI_npcMc4]
create=CustomControl,custSkin_93
x=343
y=87
parent=windowBG

[DiceUI_npcMc5]
create=CustomControl,custSkin_94
x=453
y=91
parent=windowBG

[DiceUI_goldLab]
create=NxLabel
parent=windowBG

[DiceUI_moneyLab]
create=NxLabel
x=55
y=71
parent=windowBG

[DiceUI_diceBtn]
create=NxButton,,85,25,Button_1
x=103
y=368
parent=windowBG

[DiceUI_sellBtn]
create=NxButton,,85,25,Button_1
x=193
y=368
parent=windowBG

[DiceUI_practiceBtn]
create=NxButton,,85,25,Button_1
x=285
y=368
parent=windowBG

[DiceUI_packBtn]
create=NxButton,,85,25,Button_1
x=375
y=368
parent=windowBG

[DiceUI_exitBtn]
create=NxButton,,85,25,Button_1
x=464
y=368
parent=windowBG
::EndOfConfig*/